import org.lwjgl.opengl.Display;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

/**
 * Main Class
 * An AI Adventure [replace with title later]
 * @author Akshay
 *
 */
public class Game extends StateBasedGame {
	
	public static final int STATE_MAINMENU = 1;
	public static final int STATE_SETTINGS = 2;
	public static final int STATE_GAMEPLAY = 3;
	
	public Game(){
		super("Game");		
		this.addState(new MainMenuState(STATE_MAINMENU));
		this.addState(new SettingsState(STATE_SETTINGS));
		this.addState(new GamePlayState(STATE_GAMEPLAY));
	}
	

	@Override
	public void initStatesList(GameContainer container) throws SlickException {
		this.getState(STATE_MAINMENU).init(container, this);
		this.getState(STATE_SETTINGS).init(container, this);
		this.getState(STATE_GAMEPLAY).init(container, this);
		this.enterState(STATE_MAINMENU);
		
	}
	
	public void exit(){
		Display.destroy();
		System.exit(0);
	}

	public static void main(String[] args) throws SlickException{		
		AppGameContainer app = new AppGameContainer(new Game());
		app.setDisplayMode(800, 600, false);
		app.setTargetFrameRate(60);
		app.start();
		
	}

}
